<template>
  <div id="app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive" />
    </keep-alive>
    <router-view   v-if="!$route.meta.keepAlive">
      <!-- 这里是不被缓存的视图组件，比如 page3 -->
    </router-view>
    <div class="tabs" v-show="showTab" >
      <router-link v-for="(item,index) in mlist"   :key="index" :to="item.url">
        <i @click="refresh(index)" :class="'iconfont '+ item.cls"></i>
        <h4  @click="refresh(index)" >{{item.name}}</h4>
        <b v-show="(($store.state.notice.msgCount) && index==4) || (($store.state.dzNotice) && index==1)">{{index==1?$store.state.dzNotice:$store.state.notice.msgCount}}</b>
      </router-link>
    </div>
    <!-- <quick-menu v-show="false" class="menus" :menu-count=count :icon-class="icons" :menu-url-list="list" backgroundColor="rgb(107, 188, 221)" position="bottom-right"></quick-menu> -->
    <audio style="display:none" preload="metadata" controls="controls" ref="hintAudio">
                      <source :src="myaudio" type="audio/mpeg" />
      </audio>
    <div class="shareimg" v-show="$store.state.showShare" @click='$store.commit("setshare", false)'>
      <img src="https://www.icottontrade.com/share.png" alt="">
    </div>

    <div v-if="showRegist" class="registmask">
      <div class="regist"> 
      <h4>请关注公众号</h4>
      <img src="@/assets/app.jpg" alt="">
    </div>
    </div>
    
  </div>
</template>

<script>
  // import quickMenu from "vue-quick-menu";
  import api from "@/api/api";
  import {
    Toast,Dialog
  } from 'vant'
  export default {
    name: "App",
    data() {
      return {
        count: 4,
        showRegist:false,
        myaudio: "../../static/audio/msg.mp3", //铃音
        icons: [
          "iconfont icon-mairu",
          "iconfont icon-maichu",
          "iconfont icon-kefu",
          "iconfont icon-fenxiang"
        ],
        list: [{
            isLink: true,
            url: "/m1"
          },
          {
            isLink: true,
            url: "/m2"
          },
          {
            isLink: true,
            url: "/m3"
          },
          {
            isLink: true,
            url: "/user"
          }
        ],
        menus: [
          [{
              name: "资源库",
              url: "/home",
              cls: "icon-search1187938easyiconnet"
            },
            {
              name: "定制收藏",
              url: "/demand",
              cls: "icon-Navi_goumai",
              num: 1
            },
            {
              name: "供需对接",
              url: "/supply",
              cls: "icon-xuqiuzhongxin"
            },
            {
              name: "资源上传",
              url: "/pub",
              cls: "icon-fabu"
            },
            {
              name: "用户中心",
              url: "/user",
              cls: "icon-user",
              num: 12
            }
          ],
          [{
              name: "棉花资源",
              url: "/home",
              cls: "icon-Navi_goumai"
            },
            {
              name: "购 物 车",
              url: "/user/shopcart",
              cls: "icon-search1187938easyiconnet"
            },
            {
              name: "我的订单",
              url: "/orderBuy",
              cls: "icon-search1187938easyiconnet"
            },
            {
              name: "用户中心",
              url: "/user",
              cls: "icon-user"
            }
          ],
          [{
              name: "定制需求",
              url: "/demand",
              cls: "icon-xuqiuzhongxin"
            },
            {
              name: "供需对接",
              url: "/supplyList",
              cls: "icon-search1187938easyiconnet"
            },
            {
              name: "我的列表",
              url: "/mylist",
              cls: "icon-search1187938easyiconnet"
            },
            {
              name: "用户中心",
              url: "/user",
              cls: "icon-user"
            }
          ]
        ],
        menuList: []
      };
    },
    beforeCreate() {
      var that = this;
      var reg = /code=[\_|a-z|A-Z|\d]+/;
      var wxcode = window.location.href.match(reg);
      if (wxcode) {
        wxcode = wxcode.toString().replace('code=', '');
      } else {}
      //已经登录状态，不再获取
      if (wxcode) {
        api.getUserOpenID({
          code: wxcode
        }).then(res => {
          if (res.OpenID) {
            if (res.isBlack) {
             
              Dialog.alert({
                message: '您非正式会员，如有疑问请联系客服'
              }).then(() => {
                // on close
              });
            }
            if(!res.Subscribe)
            {
              this.showRegist = true;
            }
            this.$store.commit("setUserInfo", res);
            that.getCount();
            setInterval(function() {
              that.getCount();
            }, 10000);
          } else {
            //Toast.fail('获取用户信息失败！');
          }

          
        })
      } else {
        // that.getCount();
        //     setInterval(function() {
        //       that.getCount();
        //     }, 5000);
      }
    },
    created() {
      var that = this;
      //微信jsapi
      api.getwxConfig({
        url: window.location.href.split('#')[0]
      }).then(res => {
        wx.config({
          debug: res.data.debug, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
          appId: res.data.appId, // 必填，公众号的唯一标识     
          timestamp: res.data.timestamp, // 必填，生成签名的时间戳
          nonceStr: res.data.nonceStr, // 必填，生成签名的随机串
          signature: res.data.signature, // 必填，签名，见附录1
          jsApiList: res.data.jsApiList // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
        });
        
      });
      wx.ready(function() {
        iswx = true
        if(!EntName)
        {
          that.share();
        }
        
      });
      wx.error(function(res) {
        alert(res.errMsg);
      });       
       
    },
    components: {
      // quickMenu
    },
    provide () {
      return {
        login: this.login,
        reload:this.reload
      }
    },
    methods: {
      refresh(index){
          if(index==0 && $('#batchlist1').length)
          {
             window.location.reload();
          } 
      },
      getValue(s){
        if(s)
        {
          return s;
        }else
        {
          return '';
        }
      },
      share() {
      var desc = '聚棉网为您推荐以下资源';
      var link = 'https://www.icottontrade.com/';
      var url = "https://www.icottontrade.com/cot/redirect/go?url="+encodeURI(link);
      var title = '';
      if(this.$store.state.userInfo.EntName && this.$store.state.userInfo.XM && this.$store.state.userInfo.phoneno)
      {
        title = this.$store.state.userInfo.EntName + " "+ this.$store.state.userInfo.XM + " "+this.$store.state.userInfo.phoneno ;
      }else{
        title = this.$store.state.userInfo.NickName+"为您推荐";
      }
       wx.onMenuShareAppMessage({
        title: title,
        desc: desc,
        link: url, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
        imgUrl: "https://www.icottontrade.com/cot/upload/logo.jpg", // 自定义图标
        type: "link", // 分享类型,music、video或link，不填默认为link
        dataUrl: "", // 如果type是music或video，则要提供数据链接，默认为空
        success: function() {
          // 用户确认分享后执行的回调函数
          Toast({
            message: "分享成功",
            duration: 1500
          });
        },
        cancel: function() {
          // 用户取消分享后执行的回调函数
        }
      });
      
      wx.onMenuShareTimeline({
        title: title,
        link: 'https://www.icottontrade.com/cot/redirect',
        imgUrl: "https://www.icottontrade.com/cot/upload/logo.jpg" // 自定义图标
      });
    },
      //提示音
      hint(staus) {
        if (staus != undefined) {
          this.bellStatus = !this.bellStatus;
        }
        this.bellStatus ?
          this.$refs.hintAudio.play() :
          this.$refs.hintAudio.pause();
      },
      getCount() {
        var that = this;
        api.getNoticeCount({
            UserID: that.$store.state.userInfo.ID,
            OpenID: that.$store.state.userInfo.OpenID
          })
          .then(res => {
             
            if (that.$store.state.notice.msgCount < res.msgCount) {
              that.hint(true)
            }
            that.$store.commit("setNotice", res);
          });
      },
      login(uid,pwd){

      },
      reload(){
        this.$router.go(0);
      },
    },    
    computed: {
      showTab() {
         
        return this.$route.name=="资源详情" ? false : true;
      },
      mlist() {
        var arr = this.$route.path.split("/");
        var list = [];
        if (arr[1] == "m1") {
          list = this.menus[0];
        } else if (arr[1] == "m2") {
          list = this.menus[1];
        } else if (arr[1] == "m3") {
          list = this.menus[2];
        }
        if (list.length == 0) {
          list = this.menuList.length > 0 ? this.menuList : this.menus[0];
        } else {
          this.menuList = list;
        }
        return list;
      }
    },
  };
</script>

<style scope lang='less'>
  #app {
    font-family: "Avenir", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    .shareimg {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 30%;
      z-index: 999;
      img {
        width: 100%;
      }
    }
    .registmask{
      position: fixed;
      top: 0;
      left: 0;
      background: rgba(0, 0, 0, 0.5);
      height: 100%;
      width: 100%;
      z-index: 9999;
      .regist{
      background: #fff;
      position: fixed;
      top: 20%;
      left: 10%;
      width: 80%;
      height: 50%;
      z-index: 999;
      border: 1px solid #ccc;
      box-shadow: 10px 10px 5px #888888;
      padding-top: 0.5em;
      h4{
         font-size: 16px;
      }
      img{
        width: 100%;
      }
    }
    }
    
    .menus {
      bottom: 90px !important;
      transition: all 0.6s ease;
      .sub-menu {
        line-height: 50px !important;
      }
    }
    .tabs {
      background: #fff;
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      border-top: 2px solid #ccc;
      padding: 0;
      padding: 5px 0;
      color: #666;
      z-index: 10;
      b {
        position: absolute;
        top: 0;
        right: 20px;
        background: #ff3f3e;
        color: #fff;
        font-size: 9px;
        height: 1em;
        line-height: 1em;
        border-radius: 50%;
        text-align: center;
        display: block;
        font-weight: normal;
        padding: 2px;
        min-width: 1em;
      }
      a {
        display: block;
        position: relative;
        float: left;
        width: 20%;
        text-align: center;
        text-decoration: none;
        color: inherit;
        i {
          font-size: 24px;
        }
      }
      h4 {
        font-size: 12px;
        font-weight: normal;
      }
      .router-link-active {
        color: #19a8a8;
      }
    }
  }
  html,
  body,
  a,
  button,
  input,
  textarea,
  img,
  ul,
  li,
  p,
  dl,
  dd,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  a,
  button,
  input,
  textarea,
  img {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none; // -webkit-user-select: none;
    outline: none;
  }
  body {
    height: 100%;
    width: 100vw;
    font-family: "Helvetica Neue", "Helvetica", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Arial", "sans-serif";
    font-size: 14px;
    line-height: 1.43;
    color: #333;
    word-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    transition: 0.5s;
  }
  a {
    text-decoration: none;
    color: #4078c0;
  }
  img {
    border-style: none;
  }
  ul {
    list-style: none;
  }
   ::-webkit-scrollbar-track {
    border-radius: 0;
    padding: 0;
    background-color: transparent;
  }
   ::-webkit-scrollbar-thumb {
    border-radius: 10px;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.2);
  }
   ::-webkit-scrollbar {
    width: 7px;
    height: 7px;
    background-color: transparent;
  }
  .fade-enter-active,
  .fade-leave-active {
    transition: opacity 0.3s;
  }
  .fade-enter,
  .fade-leave-to {
    opacity: 0;
  }
  .xw-ring-wrap {
    position: absolute;
    right: 5px;
    top: 3px;
    padding: 0 2px;
    z-index: 4;
  }
  .xw-ring-icon {
    background: url(/static/images/soundOn.svg) no-repeat 50%;
  }
  .xw-ring-icon-toggle {
    background: url(/static/images/soundClose.svg) no-repeat 50%;
  }
  .xw-ring-icon {
    float: right;
    padding: 5px;
    margin-right: 3px;
    height: 30px;
    width: 30px;
    opacity: 0.6;
    cursor: pointer;
    text-indent: -9999px;
    overflow: visible;
  }
  .xw-body-wrap-scroll,
  .xw-body-wrap-scroll-main {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    overflow: hidden;
    -webkit-overflow-scrolling: auto;
  }
  .xw-header {
    z-index: 2;
    max-height: 360px;
    background: #2cb98e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }
  .xw-header-content {
    position: relative;
    overflow: hidden;
    padding: 0px 16px;
    min-height: 50px;
  }
  .xw-chat-servicer:after,
  .xw-chat-servicer:before,
  .xw-chat-customer:after,
  .xw-chat-customer:before,
  .xw-chat-wrap:after,
  .xw-chat-wrap:before,
  .xw-chat-tool:after,
  .xw-chat-tool:before,
  .xw-chat-ul-box:after,
  .xw-chat-ul-box:before {
    display: table;
    content: "";
  }
  .xw-header-avatar {
    float: left;
    height: 40px;
    width: 40px;
    border-radius: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-right: 8px;
    margin-top: 5px;
  }
  .xw-header-title-wrap {
    padding: 3px 0;
    float: left;
    width: 200px;
  }
  .xw-header-title {
    font-size: 14px;
    color: #fff;
    margin-top: 8px;
  }
  .xw-chat-wrap {
    overflow: auto;
    padding-left: 16px;
    padding-bottom: 20px;
  }
  .xw-chat-wrap>ul>li {
    display: block;
  }
  .xw-chat-wrap .xw-chat-time,
  .xw-chat-wrap time {
    line-height: 1;
    text-align: center;
    display: block;
    margin-bottom: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    text-shadow: 1px 1px 1px hsla(0, 0%, 100%, 0.6);
  }
  .xw-chat-servicer,
  .xw-chat-customer {
    position: relative;
    margin-bottom: 16px;
    padding: 0 10px 0 45px;
  }
  .xw-servicer-avantar-wrap {
    position: absolute;
    bottom: 0;
    line-height: 0;
  }
  .xw-send-btn-text {
    padding: 4px 8px;
    background-color: #2cb98e;
    color: #fff;
    border-radius: 5px;
  }
  .xw-customer-avantar-wrap {
    position: absolute;
    bottom: 0;
    right: 8px;
    line-height: 0;
  }
  .xw-chat-servicer .xw-servicer-avantar-wrap,
  .xw-customer-avantar-wrap {
    left: 0;
  }
  .xw-servicer-avantar {
    border-radius: 100%;
  }
  .xw-servicer-avantar-wrap img,
  .xw-customer-avantar-wrap img {
    height: 34px;
    width: 34px;
  }
  .xw-chat-msg {
    -webkit-font-smoothing: antialiased;
    hyphens: auto;
    word-wrap: break-word;
    word-break: normal;
    position: relative;
    clear: both;
    padding: 8px 16px;
    border: 1px solid transparent;
    max-width: 100%;
    min-width: 50px;
    min-height: 22px;
    line-height: 1.6em;
    max-width: 70%;
  }
  .xw-chat-servicer .xw-chat-msg {
    background: #fff;
    border-color: #efefef;
    float: left;
  }
  .xw-chat-msg :last-child {
    margin-bottom: 0;
  }
  .xw-chat-msg span {
    white-space: pre-line;
  }
  .xw-chat-servicer,
  .xw-chat-customer {
    position: relative;
    margin-bottom: 16px;
    padding: 0 10px 0 45px;
  }
  .xw-chat-customer {
    text-align: right;
  }
  .xw-chat-customer .xw-chat-msg {
    float: right;
    text-align: left;
    background: #2cb98e;
    border-color: #2cb98e;
    color: #fff;
    margin-right: 45px;
  }
  .xw-customer-avantar {
    border-radius: 50%;
  }
  .xw-chat-msg :last-child {
    margin-bottom: 0;
  }
  .xw-chat-wrap .xw-system-info-time,
  .xw-chat-wrap time {
    line-height: 1;
    text-align: center;
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #999;
    text-shadow: 1px 1px 1px hsla(0, 0%, 100%, 0.6);
  }
  .xw-system-info {
    margin-bottom: 8px;
  }
  .xw-chat-wrap> :last-child {
    margin-bottom: 16px;
  }
  .xw-system-info {
    text-align: center;
    font-size: 12px;
  }
  .xw-system-info span {
    display: inline-block;
    background: rgba(0, 0, 0, 0.08);
    padding: 4px 8px;
    line-height: 1;
    color: #7c7c7c;
    border-radius: 2px;
    text-shadow: 1px 1px 1px hsla(0, 0%, 100%, 0.6);
  }
  .xw-footer-wrap {
    justify-content: flex-end;
    width: 100%;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.05);
    background: #fff;
    z-index: 2;
  }
  .xw-footer-content {
    position: relative;
    height: 52px;
    display: flex; // box-shadow: rgba(0, 0, 0, 0.05) 0px -1px 4px;
    // border-bottom: 1px solid red;
    h3 {
      width: 100%;
      border-bottom: 1px solid #d6d6d6;
      position: absolute;
      bottom: 5px;
      left: 0;
      z-index: 100;
    }
  }
  .xw-vmodel-wrap {
    text-align: left;
    flex: 1;
    h5 {
      position: absolute;
      left: 5px;
      top: 15px;
      color: #19a8a8;
    }
  }
  .xw-content-textarea {
    width: 100%;
    box-sizing: border-box;
    z-index: 1;
    overflow-y: auto;
    font-size: 14px;
    line-height: 14px;
    border: none;
    resize: none;
    padding: 16px 85px 16px 10px;
    font-family: inherit;
    white-space: pre;
    white-space: pre-wrap;
    word-wrap: break-word;
  }
  .xw-chat-tool {
    position: absolute;
    right: 0px;
    bottom: 0;
    z-index: 2;
  }
  .xw-chat-tool-item {
    height: 52px;
    line-height: 52px;
    position: relative;
    float: left;
    background: #fff;
  }
  .xw-chat-tool-btn {
    display: block;
  }
  .xw-chat-tool-btn {
    margin-top: 7px;
    height: 38px;
    width: 38px;
    border-radius: 100%;
    text-indent: -9999px;
    opacity: 0.5;
    overflow: hidden;
    transform: translateZ(0);
    margin-left: 10px;
  }
  .xw-chat-tool-btn.xw-face {
    background: url(/static/images/smileOn.svg) no-repeat 50%;
  }
  .xw-chat-tool-btn.xw-face-close {
    background: url(/static/images/smileClose.svg) no-repeat 50%;
  }
  .xw-chat-tool-item .xw-window-text {
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-bottom: -3px;
    -webkit-transform: translateX(-60%);
    transform: translateX(-60%);
    white-space: nowrap;
    box-shadow: 0 3px 18px 2px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.05);
    font-size: 12px;
    background: #fff;
    line-height: 1em;
  }
  .xw-chat-tool-item .xw-window-text.xw-face-emoji-ul {
    right: -23px;
    left: auto;
    -webkit-transform: none;
    transform: none;
  }
  .xw-chat-tool-item .xw-window-text h4 {
    font-size: 12px;
    margin: 0;
    font-weight: 400;
    padding: 12px 8px;
    padding-bottom: 0;
  }
  .xw-chat-ul-box {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .xw-chat-ul-box {
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 8px;
    height: 130px;
    overflow: hidden;
    width: 340px;
    margin: 0px auto;
  }
  .xw-chat-tool-item .xw-window-text .xw-chat-ul-box {
    padding: 8px;
  }
  .swiper-slide {
    float: left;
  }
  .xw-chat-ul-box a {
    display: block;
    height: 40px;
    width: 40px;
  }
  .swiper-pagination {
    display: flex;
    width: 100%;
    justify-content: center;
  }
  .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    display: inline-block;
    background: #ccc;
    border-radius: 10px;
    margin-left: 5px;
    margin-right: 5px;
  }
  .swiper-pagination-bullet-active {
    background: #007aff;
  }
  .xw-chat-tool-item {
    height: 52px;
    position: relative;
    float: left;
  }
  .xw-hide-operation {
    background: url(/static/images/addOn.svg) no-repeat 50%;
    width: 38px;
    height: 38px;
    margin-right: 10px;
    transform: scale(0.7);
  }
  .xw-hide-operation-close {
    background: url(/static/images/addClose.svg) no-repeat 50%;
    width: 38px;
    height: 38px;
    margin-right: 10px;
    transform: scale(0.7);
  }
  .xw-chat-tool-item .xw-window-text span {
    display: block;
    padding: 10px 12px;
    background: #fff;
    position: relative;
    z-index: 1;
    font-size: 17px;
    line-height: 16px;
  }
  .xw-chat-servicer:after,
  .xw-chat-customer:after,
  .xw-chat-wrap:after,
  .xw-chat-tool:after,
  .xw-chat-ul-box:after {
    clear: both;
  }
  .xw-chat-msg:last-child:before {
    bottom: -1px;
  }
  .xw-chat-msg:last-child:after,
  .xw-chat-msg:last-child:before {
    content: "";
    position: absolute;
    height: 0;
    width: 0;
    display: block;
  }
  .xw-chat-customer .xw-chat-msg:last-child:before {
    display: inline-block;
    height: 0;
    width: 0;
    border: 10px solid transparent;
    border-bottom: 10px solid #2cb98e;
    right: -10px;
    border-left-width: 9px;
  }
  .xw-chat-servicer .xw-chat-msg:last-child:before {
    display: inline-block;
    height: 0;
    width: 0;
    border: 10px solid transparent;
    border-bottom: 10px solid #efefef;
    left: -10px;
    border-left-width: 9px;
  }
  .xw-chat-servicer .xw-chat-msg:last-child:after {
    display: inline-block;
    height: 0;
    width: 0;
    border: 10px solid transparent;
    border-bottom: 10px solid #fff;
    left: -8px;
    border-left-width: 9px;
    bottom: 0px;
  }
  .xw-show-info-box {
    height: 150px;
    margin-top: -50px;
    z-index: 1000;
    background: #2cb98e;
    color: #fff;
  }
  .xw-logo {
    text-align: center;
  }
  .xw-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-top: 20px;
  }
  .xw-header-info p {
    height: 110px;
    padding: 0 16px;
    line-height: 1.6rem;
    word-wrap: break-word;
    text-align: left;
    overflow: auto;
    text-align: center;
  }
  .xw-faceEmoji {
    margin-bottom: 7px;
    width: 20%;
    float: left;
  }
  .xw-faceEmoji-main {
    text-align: center;
  }
  .xw-samll-pop-wrap {
    position: absolute;
    height: 160px;
    width: 30%;
    top: 0;
    right: 0;
    background-size: 100% 100%;
    background: url(/static/images/s.jpg) no-repeat;
    z-index: 1000;
  }
  .xw-pop-server {
    background: url(/static/images/s.jpg) no-repeat;
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
  }
  .xw-pop-customer {
    position: absolute;
    bottom: 20px;
    width: 80%;
    height: 200px;
    background: url(/static/images/c.jpg) no-repeat;
    z-index: 101;
    left: 50%;
    margin-left: -40%;
    text-align: center;
  }
  .xw-narrow-pop {
    width: 40px;
    height: 40px;
    position: absolute;
    right: 5px;
    top: 5px;
    display: inline-block;
    background: red;
    color: #fff;
    text-align: center;
  }
  .xw-big-pop {
    display: block;
    background: red;
    color: #fff;
    line-height: 40px;
    text-align: center;
  }
  .xw-hang-up {
    background: red;
    width: 100px;
    height: 34px;
    display: inline-block;
    border-radius: 20%;
    position: absolute;
    bottom: 10px;
    transform: translateX(-50%);
  }
  .xw-hang-up-icon {
    position: relative;
    z-index: 1290;
    width: 40px;
    height: 34px;
  }
  .xw-chat-msg span img {
    vertical-align: middle;
  }
  .mint-swipe-items-wrap>div {
    text-align: center;
  }
  .xw-scroll-ul {
    min-height: 340px;
  }
  .mint-swipe-indicator.is-active {
    background: #2cb98e;
    opacity: 1;
  }
</style>
